-- GENERATED SPELL FOR [Northspring Windcaller] --


function spell0_5366(pUnit, Event) --@Enveloping Winds,n/a--
pUnit:FullCastSpellOnTarget(6728,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5366', 12000, 1)
end

function spell1_5366(pUnit, Event) --@Flow of the Northspring,Heal--
pUnit:FullCastSpellOnTarget(11014,pUnit)
pUnit:RegisterEvent('Sorts_5366', 15000, 1)
end

function spell2_5366(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5366', 3000, 1)
end

function Sorts_5366(pUnit, Event)
local choix_sorts_5366 = math.random(0, 2)
if choix_sorts_5366 == 0 then
pUnit:RegisterEvent('spell0_5366', 1, 1)
end
if choix_sorts_5366 == 1 then
pUnit:RegisterEvent('spell1_5366', 1, 1)
end
if choix_sorts_5366 == 2 then
pUnit:RegisterEvent('spell2_5366', 1, 1)
end
end

function mob5366_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5366', math.random(1500, 3000), 1)
end

function mob5366_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5366_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5366_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5366, 1, 'mob5366_Action')
RegisterUnitEvent(5366, 2, 'mob5366_Leave')
RegisterUnitEvent(5366, 3, 'mob5366_Kill')
RegisterUnitEvent(5366, 4, 'mob5366_Die')
